# 输入一行字符，分别统计其中数字、英文字母、空格和其它字符的个数。
def main(string: str):
    char = 0
    num = 0
    space = 0
    other = 0
    for i in string:
        if i.isdigit():
            num += 1
        elif i.isalpha():
            char += 1
        elif i.isspace():
            space += 1
        else:
            other += 1
    return num, char, space, other


if __name__ == "__main__":
    string = "zhfu2345235hfha f zj feawiofa faef329052390 fs fasoifoiweq .,"
    num, char, space, other = main(string)
    print("数字个数：", num)
    print("英文字母个数：", char)
    print("空格个数：", space)
    print("其它字符个数：", other)
